VERSION = v0.1
NAME    = willows

# Toolchains/Compilers
PANDOC		 = pandoc
PANDOC_FLAGS = -f markdown -t html

# Utility programs
RM_RF   = rm -rf
MKDIR   = mkdir
COPY    = cp -r
TARBALL = tar -cvf

# Directories and files
PREFIX   = /usr/local
PROJROOT = $(shell pwd)
OUTDIR   = $(PROJROOT)/output
JUNK     = $(shell cat .gitignore)

all: $(OUTDIR) installer
build: all
rebuild: clean build

$(OUTDIR):
	$(MKDIR) $(OUTDIR)

clean:
	$(RM_RF) $(JUNK)

dist: rebuild
	$(MKDIR) willows/
	$(COPY) $(OUTDIR)/* willows/
	$(COPY) resources/* willows/
	$(COPY) LICENSE.txt willows/
	$(COPY) Readme.md willows/
	$(TARBALL) $(OUTDIR)/$(NAME)-$(VERSION).tar.gz willows/
	$(RM_RF) willows/

include src/installer/installer.mk

